<template>
  <div class="app-container">
    <div>工具页：</div>
    <div class="txt">一些工具例子</div>

    <el-upload
      action="/api/Common/upload"
      list-type="picture-card"
      :http-request="$.user.upload"
      :on-preview="handlePreview"
      :on-remove="handleRemove"
      :before-upload="handleBefore"
    >
      <i class="el-icon-plus"></i>
    </el-upload>

    <Tinymce v-model="content" class="tinymce" :height="300" />
  </div>
</template>

<script>
import Tinymce from '@/components/Tinymce'

export default {
  components: { Tinymce },

  data() {
    return {
      content: '',
    }
  },
  created() {},

  mounted() {},
  methods: {
    // 删除图片
    handleRemove(e) {
      let { path } = e.response.result
      console.log(path)
    },

    //
    handlePreview(e) {
      console.log(e)
    },

    handleBefore(e) {
      console.log(e)
    },
  },
}
</script>

<style lang="scss" scoped></style>
